<#include "includemenu.html"/>
<script type="text/javascript">
//批量删除表字段的form
function delPropertysForm(){
	 if($("input[name='propertyids']:checked").length>0){
	 	art.confirm('您确定删除选中的这些表字段？',
	 	function(){
	 		$("#propertyform").attr("action","/${orgi}/dm/database/tablepropertydellist.html");
	 		$("#propertyform").submit();
	 	},
	 	function(){})
	 }else{
		 alertMsg("请先选择要删除的表字段");
	 }
	}

</script>

<!--<div class="rs_layout_right" style="width:300px;"></div>-->
<div class="rs_layout_center">
	<div class="rs_layout">
		<div class="rs_layout_center"> 	
			<div class="tableScrollWrap">
			<form id="propertyform" method="post" action="">
				<table class="table_style_1">
					<thead>
						<tr>
							<th></th>
							<th><i class="verMidWrap">显示标题</i><i class="tbArrow"></i></th>
							<th><i class="verMidWrap">字段名</i><i class="tbArrow"></i></th>
							<th class="minSize">主键</th>
							<th class="minSize"><i class="verMidWrap">字段类型</i><i class="tbArrow"></i></th>
							<th class="minSize">操作
						 
								<a href="/${orgi}/dm/database/propertyupdate/${table.id!''}.html" title="还原已删除字段"><i class="tbControlIcon top_icon4"></i></a>
							</th>
						</tr>
					</thead>
					<tbody>
						<#if tablepropertyList??>
						<#list tablepropertyList as property>
						<tr>
							<td class="tdIcons"><input name ="propertyids" value="${property.id!''}" type="checkbox"></td>
							<td>${property.name!''}</td>
							<td>${property.fieldname!''}<#if property.groupid??>&nbsp;&nbsp;【${property.groupid!''}】</#if></td>
							<td class="tdIcons" onclick='$("#p_${property_index}").prop("checked" , !$("#p_${property_index}").prop("checked"));loadURL("/${orgi}/dm/database/${table.dbid!''}/${table.tabledirid!''}/${property.dbtableid!''}/tablepropertypk/${property.id!''}.html?v="+$("#p_${property_index}").prop("checked"))'><input name ="pk"  id="p_${property_index}" value="1" type="checkbox" <#if property.pk?? && property.pk == true>checked="checked"</#if>></td>
							<td class="minSize">${property.datatypename!''}（${property.datatypecode!''}）</td>
							<td class="minSize">
								<#if table??>                                                           
								                                                                        
								<a href="/${orgi}/dm/database/${table.dbid!''}/${table.tabledirid!''}/${property.dbtableid!''}/tablepropertydel/${property.id!''}.html" data-toggle="delete" data-title="请确认是否删除该表字段？" title="删除字段${property.fieldname!''}">
								<i class="tbControlIcon tci-106"></i>
								</a>
									
								</#if>
							</td>
						</tr>
						</#list>
						</#if>
					</tbody>
				</table>
				</form>
			</div>

		</div>
		<div class="rs_layout_bottom toolBar_bottom">
			<ul class="toolbarBottom_IconWrap">
				<li class="tb-icons-4" onclick="delPropertysForm();" title="批量删除表字段"></li>
			</ul>
		</div>
	</div>
</div>